package service.impl;

import dao.IRoleDao;
import domain.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.IRoleService;

import java.util.List;

/**
 * @author ：Yan Guang
 * @date ：Created in 2020/9/25 12:51
 * @description：
 */
@Service("roleService")
@Transactional
public class RoleServiceImpl implements IRoleService {
    @Autowired
    private IRoleDao iRoleDao;

    @Override
    public List<Role> findAll() throws Exception {
        return iRoleDao.findAll();
    }

    @Override
    public void saveRole(Role role) throws Exception{
        iRoleDao.saveRole(role);
    }
}
